package com.ruoyi.teacher.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.teacher.domain.TPaper;
import com.ruoyi.teacher.vo.TPaperVo;
import com.ruoyi.teacher.mapper.TPaperMapper;
import com.ruoyi.teacher.service.ITPaperService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 试卷Service业务层处理
 *
 * @author ruoyi
 * @date 2024-12-03
 */
@Service
public class TPaperServiceImpl extends ServiceImpl<TPaperMapper, TPaper> implements ITPaperService {

    @Override
    public TableDataInfo<TPaperVo> queryList(TPaperVo entity) {
        return PageUtils.buildDataInfo(this.baseMapper.queryList(PageUtils.buildPage(), entity));
    }

    @Override
    public List<TPaperVo> queryAll(TPaperVo entity) {
        return this.baseMapper.queryList(entity);
    }

    @Override
    public TPaperVo queryById(Long id) {
        return this.baseMapper.queryById(id);
    }
}
